﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;

namespace DtoFw.Enum
{
    public class EnumHelper
    {
        public static string GetEnumDescription(System.Enum value)
        {
            string name = value.ToString();
            FieldInfo fieldInfo = value.GetType().GetField(name);
            DescriptionAttribute descriptionAttribute = fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault() as DescriptionAttribute;
            if (descriptionAttribute != null)
                return descriptionAttribute.Description;
            return string.Empty;
        }
    }
    public class EnumClass 
    {
        /// <summary>
        /// 预警配置
        /// </summary>
        public static string WarnConfig = "Warn";

        /// <summary>
        /// 系统配置
        /// </summary>
        public static string SysConfig = "SysConfig";

       /// <summary>
       /// 硬件配置
       /// </summary>
        public static string HardwareConfig = "HardwareConfig";

        /// <summary>
        /// 硬件配置
        /// </summary>
        public static string FlowConfig = "FlowConfig";
        /// <summary>
        /// 数据库备份配置
        /// </summary>
        public static string DbBakConfig = "DbBakConfig";

    }

    public enum ConfigEnum
    {

    }
    /// <summary>
    /// 异常预警枚举
    /// </summary>
    public enum EarlyWarningConfigEnum
    {
        /// <summary>
        /// 未绑定典字标签
        /// </summary>
        [Description("未绑定典字标签")]
        Tag,
        /// <summary>
        /// 未及时入库
        /// </summary>
        Stock,
        /// <summary>
        /// 超时回库
        /// </summary>
        Revert,
        /// <summary>
        /// 保存超期
        /// </summary>
        Save,
        /// <summary>
        /// 库存容量
        /// </summary>
        Capacity,
        /// <summary>
        /// 异常出库
        /// </summary>
        Level,
        /// <summary>
        /// 环境预警
        /// </summary>
        Environmental,
    }
    public enum EnumSystemNumber
    {
        /// <summary>
        /// 物品编号
        /// </summary>
        WZBH,
        /// <summary>
        /// 案件编号
        /// </summary>
        AJBH,
        /// <summary>
        /// 凭证编号
        /// </summary>
        PZBH,
        /// <summary>
        /// 审批编号
        /// </summary>
        SPBH
    }
    /// <summary>
    /// 物品状态
    /// </summary>
    public enum EnumEvidenceStatus
    {
        /// <summary>
        /// 未知
        /// </summary>
        WZ = -1,
        /// <summary>
        /// 登记
        /// </summary>
        DJ = 0,
        /// <summary>
        /// 已入库
        /// </summary>
        RK = 1,
        /// <summary>
        /// 已出库
        /// </summary>
        CK = 2
    }
    /// <summary>
    /// 审核状态
    /// </summary>
    public enum EnumApproveStatus
    {
        /// <summary>
        /// 未审核
        /// </summary>
        WSH = 0,
        /// <summary>
        /// 已审核
        /// </summary>
        YSH = 1
    }
    /// <summary>
    /// 类别
    /// </summary>
    public enum EnumDeliveryDicType
    {
        /// <summary>
        /// 未知
        /// </summary>
        WZ = 0,
        /// <summary>
        /// 借调
        /// </summary>
        JD = 1,
        /// <summary>
        /// 检验
        /// </summary>
        JY = 2,
        /// <summary>
        /// 发还
        /// </summary>
        FH = 3,
        /// <summary>
        /// 销毁
        /// </summary>
        XH = 4,
        /// <summary>
        /// 移交
        /// </summary>
        YJ = 5,
        /// <summary>
        /// 回库
        /// </summary>
        GH = 6,
        /// <summary>
        /// 更换位置
        /// </summary>
        GHWZ = 7,
        /// <summary>
        /// 入库
        /// </summary>
        RK = 8

    }

    /// <summary>
    /// 预警类型
    /// </summary>
    public enum EalyWarnTypeEnum
    {
        /// <summary>
        /// 物品未绑定
        /// </summary>
        eNoBindWarning = 1,

        /// <summary>
        /// 未及时入库
        /// </summary>
        eOvertimeStockWarning = 2,

        /// <summary>
        /// 未及时回库
        /// </summary>
        eOvertimeRevertWarning = 3,

        /// <summary>
        /// 异常出库
        /// </summary>
        eUnusualLevelWarning = 4,

        /// <summary>
        /// 温度
        /// </summary>
        eTemperatureWarning = 5,

        /// <summary>
        /// 湿度
        /// </summary>
        eHumidityWarning = 6,

        /// <summary>
        /// 烟感
        /// </summary>
        eSmokeWarning = 7,

        /// <summary>
        /// 水侵
        /// </summary>
        eWaterWarning = 8,

        /// <summary>
        /// 空气质量
        /// </summary>
        eAirWarning = 9,

        /// <summary>
        /// 保存超期预警
        /// </summary>
        OvertimeSaveWarning = 10,
         
        /// <summary>
        /// 库存容量预警
        /// </summary>
        eStockQuantityWarning = 11,

        /// <summary>
        /// 审核
        /// </summary>
        eAuditingWarning = 12,
    }


    /// <summary>
    /// 报警类别
    /// </summary>
    public class WarningCategory
    {
        /// <summary>
        /// 未绑定电子标签预警
        /// </summary>
        public const string NoBindTagDtoWarning = "noBindTagDtoWarning";

        /// <summary>
        /// 未及时入库预警
        /// </summary>
        public const string OvertimeStockWarning = "overtimeStockWarning";

        /// <summary>
        /// 未及时回库预警
        /// </summary>
        public const string OvertimeRevertWarning = "overtimeRevertWarning";

        /// <summary>
        /// 异常出库预警
        /// </summary>
        public const string UnusualLevelWarning = "unusualLevelWarning";

        /// <summary>
        /// 环境异常预警
        /// </summary>
        public const string EnvironmentalWarning = "environmentalWarning";

        /// <summary>
        /// 保存超期预警
        /// </summary>
        public const string OvertimeSaveWarning = "overtimeSaveWarning";

        /// <summary>
        /// 库存容量预警
        /// </summary>
        public const string StockQuantityWarning = "stockQuantityWarning";
    }
}
